
//
//  Report.m
//  CYWFrame
//
//  Created by Macx on 2017/10/11.
//  Copyright © 2017年 Macx. All rights reserved.
//

#import "Report.h"
#import "LZCTools.h"

@implementation Report

+ (void)reportAction {
    
    UIViewController *currVC = [((AppDelegate *)[UIApplication sharedApplication].delegate) topViewController];
    
    if (GetUserDefaule(USERINFO) == NULL) {
        [currVC presentViewController:[LZCTools alertMessage:@"请先登录"]animated:YES completion:nil];
        return;
    }
    
    UIAlertController *alert;
    
//    if ([btn.titleLabel.text isEqualToString:@"举报"]) {
        alert = [UIAlertController alertControllerWithTitle:@"举报" message:@"选取举报原因" preferredStyle:UIAlertControllerStyleActionSheet];
        
        [alert addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
        }]];
        [alert addAction:[UIAlertAction actionWithTitle:@"广告" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
            [currVC presentViewController:[LZCTools alertMessage:@"举报成功"] animated:YES completion:nil];
        }]];
        [alert addAction:[UIAlertAction actionWithTitle:@"垃圾营销" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
            [currVC presentViewController:[LZCTools alertMessage:@"举报成功"] animated:YES completion:nil];
        }]];
        [alert addAction:[UIAlertAction actionWithTitle:@"不实信息" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
            [currVC presentViewController:[LZCTools alertMessage:@"举报成功"] animated:YES completion:nil];
        }]];
        [alert addAction:[UIAlertAction actionWithTitle:@"淫秽色情" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
            [currVC presentViewController:[LZCTools alertMessage:@"举报成功"] animated:YES completion:nil];
        }]];
        [alert addAction:[UIAlertAction actionWithTitle:@"抄袭" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
            [currVC presentViewController:[LZCTools alertMessage:@"举报成功"] animated:YES completion:nil];
        }]];
//        
//    }
//    else {
//        alert = [UIAlertController alertControllerWithTitle:@"已举报" message:nil preferredStyle:UIAlertControllerStyleAlert];
//        [alert addAction:[UIAlertAction actionWithTitle:@"" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
//            
//        }]];
//    }
    
    [currVC presentViewController:alert animated:YES completion:nil];
    
//    [currVC.navigationController pushViewController:alert animated:YES];
    
}

@end
